<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title></title>
    <!-- Bootstrap Styles-->
    <link href="__BACK__/css/bootstrap.css" rel="stylesheet"/>
    <!-- FontAwesome Styles-->
    <link href="__BACK__/css/font-awesome.css" rel="stylesheet"/>
    <!-- Morris Chart Styles-->

    <!-- Custom Styles-->
    <link href="__BACK__/css/custom-styles.css" rel="stylesheet"/>
    <!-- Google Fonts-->
    <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'/>
    <!-- TABLE STYLES-->
    <link href="__BACK__/js/dataTables/dataTables.bootstrap.css" rel="stylesheet"/>
</head>
<body>
<div id="wrapper">
    {include file="public/top"}
    <!--/. NAV TOP  -->
    {include file="public/left"}
    <!--/. NAV TOP  -->

    <!-- /. NAV SIDE  -->
    <div id="page-wrapper">
        <div id="page-inner">
            <div class="row">
                <div class="col-md-12">
                    <h1 class="page-header">
                        提现列表
                        <small>user lists</small>
                    </h1>
                </div>
            </div>
            <!-- /. ROW  -->

            <div class="row">
                <div class="col-md-12">
                    <!-- Advanced Tables -->
                    <div class="panel panel-default">

                        <div class="panel-body">
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                                    <thead>
                                    <tr>
                                        <th>id</th>
                                        <th>提现用户</th>
                                        <th>提现类型</th>
                                        <th>提现账户</th>
                                        <th>提现金额</th>
                                        <th>提现时间</th>
                                        <th>状态</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {foreach $cash as $k=>$v}
                                    <tr class="odd gradeX">
                                        <td>{$v['id']}</td>
                                        <td>
                                            {$v['mobile']}
                                        </td>
                                        <td>
                                            {if($v['type']=='ali')}
                                            支付宝
                                            {/if}
                                            {if($v['type']=='wx')}
                                            微信
                                            {/if}
                                        </td>
                                        <td class="center">{$v['accont']}</td>
                                        <td class="center">{$v['money']}</td>
                                        <td class="center">{:sign_time_str($v['create_time'])}</td>
                                        {eq name="$v['status']" value='0'}
                                        <td class="center">未完成</td>
                                        {/eq}
                                        {eq name="$v['status']" value='1'}
                                        <td style="color: blue" class="center">通过</td>
                                        {/eq}
                                        {eq name="$v['status']" value='2'}
                                        <td style="color: red" class="center">拒绝</td>
                                        {/eq}

                                        {eq name="$v['status']" value='0'}
                                        <td class="center">
                                            <a class="btn btn-primary" href="{:url('cash/accept',array('id' => $v['id']))}">通过</a>
                                            <a class="btn btn-danger" href="{:url('cash/deny',array('did' => $v['id'],'uid'=>$v['uid'],'money'=>$v['money']))}">拒绝</a>
                                        </td>
                                        {else/}
                                        <td>已完成</td>
                                        {/eq}
                                    </tr>
                                    {/foreach}
                                    </tbody>
                                </table>
                            </div>
                            {$cash->render()}
                        </div>
                    </div>
                    <!--End Advanced Tables -->
                </div>
            </div>
            <!-- /. ROW  -->
        </div>
        <footer>
        </footer>
    </div>

    <!-- /. PAGE INNER  -->
</div>
<!-- /. PAGE WRAPPER  -->
<!-- /. WRAPPER  -->
<!-- JS Scripts-->
<script src="__BACK__/js/jquery-1.10.2.js"></script>
<!-- Bootstrap Js -->
<script src="__BACK__/js/bootstrap.min.js"></script>

<!-- Metis Menu Js -->
<script src="__BACK__/js/jquery.metisMenu.js"></script>
<!-- Morris Chart Js -->
<script src="__BACK__/js/morris/raphael-2.1.0.min.js"></script>
<script src="__BACK__/js/morris/morris.js"></script>


<script src="__BACK__/js/easypiechart.js"></script>
<script src="__BACK__/js/easypiechart-data.js"></script>

<script src="__BACK__/js/Lightweight-Chart/jquery.chart.js"></script>

<!-- Custom Js -->
<script src="__BACK__/js/custom-scripts.js"></script>
<script>
    function autocard(id,that) {
        var card = that.val();
        $.post('{:url("index/is_card")}',{'id':id,'status':card},function (res) {
            if(res==1){
                that.html('关闭');
                that.attr('class','btn btn-danger card');
                that.val('0');
            }
            if(res==0){
                that.html('开启');
                that.attr('class','btn btn-primary card');
                that.val('1');
            }
        })
        // console.log($("input[class='card']"));
    }


</script>

</body>
</html>
